package br.ufmg.ubicomp.droidguide.application;

import java.util.Collection;

import br.ufmg.ubicomp.droidguide.common.DroidGuideConfigurationManager;
import br.ufmg.ubicomp.droidguide.common.DroidGuideConstants;
import br.ufmg.ubicomp.droidguide.scheduler.DroidGuideActivity;
import br.ufmg.ubicomp.droidguide.scheduler.SchedulerService;

public class TouristActivities extends ListActivities {

	protected void initTouristActivities()
	{
		SchedulerService service = SchedulerService.getInstance();
		String dgKey = DroidGuideConfigurationManager.getInstance().getData(
				DroidGuideConstants.DROID_GUIDE_USER_KEY);
		
		try {
			Collection<DroidGuideActivity> activities = null; 
			if (DroidGuideConfigurationManager.getInstance().getData("actType").equals("getRecomended"))
			{
				activities = 
					service.getActivitiesForUser(dgKey);
			} else if (DroidGuideConfigurationManager.getInstance().getData("actType").equals("getAll"))
			{
				activities = 
					service.listActivities(dgKey);
			}
			
			for (DroidGuideActivity act:activities)
			{
				infoItems.add(act.getName());
			}
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
//		infoItems.add("Pampulha Lake");
//		infoItems.add("Saint Francis Church");
//		infoItems.add("Pampulha Zoo");
//		infoItems.add("Ecological Park");
//		infoItems.add("Mineirao Stadium");
//		infoItems.add("Mineirinho Stadium");
//		infoItems.add("Museum of Art");
//		infoItems.add("Yatch club");
//		infoItems.add("Zoo Botanic Foundation");
//		infoItems.add("Federal University of Minas Gerais");
//		infoItems.add("Xapuri Restaurant");
//		infoItems.add("Pampulha Amusement Park");		
	}

}
